<template>
  <div class="treatment">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>患者病例信息</span>
      </div>
      <el-row class="text item">
        <el-col :span="12">患者姓名：王大宝</el-col>
        <el-col :span="12">患者编号：LM123456789</el-col>
        <el-col :span="12">患者性别：女</el-col>
        <el-col :span="12">病例编号：LM123456789</el-col>
        <el-col :span="12">主治医生：王医生</el-col>
        <el-col :span="12">订单状态：待收货</el-col>
        <el-col :span="12">套餐名称：Fit-4套餐</el-col>
        <el-col :span="12">订单时间：无</el-col>
        <el-col :span="12">套餐状态：1/4</el-col>
        <el-col :span="12">矫治器名称：罗慕矫治器</el-col>
        <el-col :span="12">诊疗阶段：复诊</el-col>
        <el-col :span="12">诊疗状态：待确认</el-col>
        <el-col :span="12">病例时间：2020-5-6</el-col>
        <el-col :span="12">物流状态：无</el-col>
      </el-row>
    </el-card>
    <div v-if="curType == 0">
      <p class="contitle">停治原因</p>
      <p class="info">创建于：2020-5-6</p>
      <el-input
        v-model="stopTreatment.reason"
        type="textarea"
        :rows="2"
        placeholder="请输入内容"
      >
      </el-input>
      <p class="contitle">结算</p>
      <p class="info">账单结算金额：
        <el-input-number v-model="stopTreatment.num" class="numInput" size="mini" controls-position="right" :min="1"></el-input-number>元
      </p>
      <el-input
        v-model="stopTreatment.reason"
        type="textarea"
        :rows="2"
        placeholder="结算说明"
      >
      </el-input>
    </div>
    <div v-else-if="curType == 1">
      <p class="contitle">取消制作原因</p>
      <el-input
        v-model="textarea"
        type="textarea"
        :rows="2"
        placeholder="请输入内容"
      >
      </el-input>
      <p class="tipError">
        <i class="el-icon-warning"></i> 请通知医生寄回矫治器
      </p>
    </div>
    <div v-else-if="curType == 2">
      <p class="contitle">重新选择矫治器原因</p>
      <el-input
        v-model="textarea"
        type="textarea"
        :rows="2"
        placeholder="请输入内容"
      >
      </el-input>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary">确认</el-button>
      <el-button type="text" @click="close">取消</el-button>
    </div>
  </div>
</template>
<script>
export default {
  props: ['curType', 'curArr'],
  // props: {
  //   'curType':{
  //     type: Number,
  //     default: 0
  //   },
  //   'curArr':{
  //     type: Array,
  //     default:function(){
  //       return [];
  //     }
  //   }
  // },
  data() {
    return {
      textarea: '',
      stopTreatment: {
        reason: '',
        num: ''
      }
    };
  },
  mounted() {
    console.log(this.curArr, this.curType);
  },
  methods: {
    close() {
      this.$emit('closeDialog', true);
    }
  }
};
</script>
<style lang="scss">
.treatment {
  .el-card .el-col {
    color: #508fcc;
    margin-bottom: 15px;
  }
  .contitle {
    padding-left: 6px;
    border-left: 3px #508fcc solid;
    color: #333;
    margin-top: 32px;
  }
  .info{
    font-size: 12px;
    color: #666666;;
  }
  .numInput{
    margin-right: 10px;
  }
  textarea{
    min-height: 120px !important;
  }
  .tipError {
    color: #ea5f5f;
  }
  .dialog-footer {
    overflow: hidden;
    margin-top: 20px;
  }
  .dialog-footer button {
    float: right;
  }
}
</style>
